package com.coder4j.system.service;

import com.coder4j.system.entity.SysConfigEntity;
import com.coder4j.system.mapper.SysConfigMapper;
import com.coder4j.system.vo.SysConfigVO;
import com.coder4j.starter.web.BaseServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.beans.BeanUtils;

import lombok.extern.slf4j.Slf4j;

import javax.annotation.Resource;

/**
 * 配置
 * @author keller
 * @date 2024-05-07 18:19:35
 */
@Service
@Slf4j
public class SysConfigService extends BaseServiceImpl<SysConfigMapper,SysConfigEntity,SysConfigVO> {

    @Resource
    private SysConfigMapper mapper;

    @Override
    public SysConfigVO entity2Vo(SysConfigEntity entity) {
        SysConfigVO vo = new SysConfigVO();
        BeanUtils.copyProperties(entity,vo);
        return vo;
    }

    @Override
    public SysConfigEntity vo2Entity(SysConfigVO vo) {
        SysConfigEntity entity = new SysConfigEntity();
        BeanUtils.copyProperties(vo, entity);
        return entity;
    }
}
